<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <form action="Login" aria-controls="Home">  </form>
        <input type="text" v-model="account.username">
        <input type="text" v-model="account.password">
        <input type="button" value='登录' @click="login">
       
  
  </div>
</template>
<script lang="ts">
  class a
  {

  }

</script>
<script>

import instance from "../Utils/Request";
export default {
  name: 'Login',
  data () {
    return {
      msg: '登录界面',
      account:{},
    }
  }
  ,methods:{
        login(){
           // this.$router.push({'Index'})
           console.log(this.account);
            console.log(JSON.stringify(this.account) );
          instance.post("Home/Login",JSON.stringify(this.account)).then(res=>{
                console.log(res);

          });
        }

  }

}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
